package homework.EXERCICE5;

import java.util.Arrays;
import java.util.Scanner;

public class EXERCISE5 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.print("Combien de mots ? ");
        int n=sc.nextInt();
        System.out.println("donnez vos mots");
        String s[]=new String[n];

        for (int i = 0; i < n; i++)
            s[i]=sc.next();

        System.out.println("Liste par ordre alphabetique :");
        Arrays.sort(s, String.CASE_INSENSITIVE_ORDER);
        for (String i:s)
            System.out.println(i);
    }
}